import './assets/main.css'
import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import './styles/global.css'
import 'katex/dist/katex.min.css'
import router from './router'
import { createPinia } from 'pinia'
import MathJax from 'mathjax-vue3'

// 禁用 Vue DevTools
const app = createApp(App, {
  devtools: false,
  productionTip: false
})

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(ElementPlus)
app.use(router)
app.use(createPinia())
app.use(MathJax, {
  tex: {
    inlineMath: [['$', '$'], ['\\(', '\\)']],
    displayMath: [['$$', '$$'], ['\\[', '\\]']],
  },
  options: {
    skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
  },
})

// 全局配置
app.config.devtools = false
app.config.productionTip = false

app.mount('#app')
